package ch5;

public class SNum3 {

	public static void main(String[] args) {
		// 9000-1000之间能被3,7,11整除，而且百位不是2的数
		int start = 9000 - 1;
		// 有错误
		while (start++ <= 10000 - 1) {
			// System.out.println("验证 " + start + "是否满足条件");

			if (start % 3 != 0)
				continue;
			if (start % 7 != 0)
				continue;
			if (start % 11 != 0)
				continue;
			if (start / 100 % 10 == 2)
				continue;

			System.out.println(start);

		}
	}

}
